package com.kehutong.house.service;

import com.kehutong.common.errcode.Result;
import com.kehutong.house.entity.CommunityMerchant;
import org.coraframework.inject.Inject;
import org.coraframework.mvc.http.ReqMapping;
import org.coraframework.mvc.webservice.WebService;
import org.coraframework.orm.jdbc.JdbcSession;

@WebService("/basic/community/merchant/service")
public class CommunityMerchantService {
    @Inject
    private JdbcSession jdbcSession;
    /**
     * 根据商户号ID查询商户绑定关系
     *
     * @return
     */
    @ReqMapping("/get")
    public Object getMerchantSettingId(String communityNo) {
        return Result.success(jdbcSession.findOne(CommunityMerchant.class)
                .eq("communityNo", communityNo)
                .eq("deleted", false)
                .exe());
    }

}
